package frame;

import pojo.User;

import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class MainFrame extends JFrame {
    private JPanel contentPane;
    public MainFrame(){
        setLocationRelativeTo(null);
        setTitle("仓库管理系统管理端");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(563, 264, 794, 551);
        contentPane = new JPanel();
        contentPane.setBackground(Color.WHITE);
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        setContentPane(contentPane);
        contentPane.setLayout(null);

        JPanel panel = new JPanel();
        panel.setBackground(Color.BLACK);
        panel.setBounds(0, 0, 778, 36);
        contentPane.add(panel);
        panel.setLayout(null);

        JLabel lblNewLabel = new JLabel("仓库管理系统");
        lblNewLabel.setFont(new Font("微软雅黑", Font.BOLD, 18));
        lblNewLabel.setBounds(277, 10, 182, 21);
        panel.add(lblNewLabel);
        lblNewLabel.setForeground(Color.WHITE);
        lblNewLabel.setBackground(Color.BLACK);
        lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);

        JPanel panel_1 = new JPanel();
        panel_1.setBounds(0, 35, 141, 477);
        contentPane.add(panel_1);
        panel_1.setLayout(null);

        JLabel lblNewLabel_1 = new JLabel("入库管理模块");
        lblNewLabel_1.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent arg0) {
                setVisible(false);
                new InputFrame().setVisible(true);
            }
        });
        lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
        lblNewLabel_1.setFont(new Font("微软雅黑", Font.BOLD, 16));
        lblNewLabel_1.setBounds(0, 0, 141, 45);
        panel_1.add(lblNewLabel_1);

        JLabel lblNewLabel_1_1 = new JLabel("出库管理模块");
        lblNewLabel_1_1.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                setVisible(false);
                new OutputFrame().setVisible(true);
            }
        });
        lblNewLabel_1_1.setHorizontalAlignment(SwingConstants.CENTER);
        lblNewLabel_1_1.setFont(new Font("微软雅黑", Font.BOLD, 16));
        lblNewLabel_1_1.setBounds(0, 51, 141, 45);
        panel_1.add(lblNewLabel_1_1);

        JLabel lblNewLabel_1_2 = new JLabel("用户管理模块");
        lblNewLabel_1_2.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                setVisible(false);
                new UserFrame().setVisible(true);
            }
        });
        lblNewLabel_1_2.setHorizontalAlignment(SwingConstants.CENTER);
        lblNewLabel_1_2.setFont(new Font("微软雅黑", Font.BOLD, 16));
        lblNewLabel_1_2.setBounds(0, 98, 141, 45);
        panel_1.add(lblNewLabel_1_2);

        JLabel lblNewLabel_1_2_1 = new JLabel("退出系统");
        lblNewLabel_1_2_1.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                System.exit(1);
            }
        });
        lblNewLabel_1_2_1.setHorizontalAlignment(SwingConstants.CENTER);
        lblNewLabel_1_2_1.setFont(new Font("微软雅黑", Font.BOLD, 16));
        lblNewLabel_1_2_1.setBounds(0, 142, 141, 45);
        panel_1.add(lblNewLabel_1_2_1);
    }
}
